package com.itheima.stock.pojo.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author by itheima
 * @Date 2022/2/28
 * @Description 股票涨跌信息
 */
@ApiModel(description = "股票涨跌信息")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class StockUpdownDomain {
    @ApiModelProperty("股票编码")
    @ExcelProperty(value = {"股票涨幅信息统计表","股票编码"},index = 0)
    private String code;//股票编码

    @ApiModelProperty("股票名称")
    @ExcelProperty(value = {"股票涨幅信息统计表","股票编码"},index = 1)
    private String name;//股票名称

    @ApiModelProperty("前收盘价")
    @ExcelProperty(value = {"股票涨幅信息统计表","股票编码"},index = 2)
    private BigDecimal preClosePrice;//前收盘价

    @ApiModelProperty("当前交易价")
    @ExcelProperty(value = {"股票涨幅信息统计表","股票编码"},index = 3)
    private BigDecimal tradePrice;//当前交易价

    @ApiModelProperty("涨跌值")
    @ExcelProperty(value = {"股票涨幅信息统计表","股票编码"},index = 4)
    private BigDecimal increase;//涨跌值

    @ApiModelProperty("涨幅")
    @ExcelProperty(value = {"股票涨幅信息统计表","股票编码"},index = 5)
    private BigDecimal upDown;//涨幅

    @ApiModelProperty("振幅")
    @ExcelProperty(value = {"股票涨幅信息统计表","股票编码"},index = 6)
    private BigDecimal amplitude;//振幅

    @ApiModelProperty("交易量")
    @ExcelProperty(value = {"股票涨幅信息统计表","股票编码"},index = 7)
    private Long tradeAmt;//交易量

    @ApiModelProperty("交易金额")
    @ExcelProperty(value = {"股票涨幅信息统计表","股票编码"},index = 8)
    private BigDecimal tradeVol;//交易金额

    /**
     * 日期
     */
    @ApiModelProperty("当前日期")
    @ExcelProperty(value = {"股票涨幅信息统计表","股票编码"},index = 9   )
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")//springmvc的注解-》json格式数据
    private Date curDate;//当前日期
}
